/*
 * @Author: your name
 * @Date: 2021-12-21 07:39:16
 * @LastEditTime: 2021-12-21 19:00:23
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \day10 react\my-app\src\component\Header.js
 */
import React, { Component } from 'react';
import { Icon } from 'react-vant';
 
class Header extends Component {

    goBack(){
        this.props.history.go(-1)
    }

    render() { 
        let {name}=this.props
        return (
            <div style={{display:"flex",width:"100%",height:"50px",justifyContent:"space-between",padding:"0px 10px",alignItems:"center"}}>
               <Icon name="arrow-left" onClick={this.goBack.bind(this)}/>
               <b>{name}</b>
               <Icon name="ellipsis" />
            </div>
        );
    }
}
 
export default Header;